<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Pesquisa de Fornecedor</title>
        <link href="/Digipao/media/css/bootstrap.css" rel="stylesheet" type="text/css"/>
        <link href="/Digipao/media/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
        <link href="/Digipao/media/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
        <link href="/Digipao/media/css/backgroud-digipao.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <script type="text/javascript" src="js/digipao.js"></script>

        <form action="${pageContext.request.contextPath}/pesquisaFornecedor" method="post">
            <div id="fundo-externo">
                <div id="fundo">
                    <img src="/Digipao/media/images/zoom-bg-1.jpg" alt=""/>
                </div>
            </div>

            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center margin-top-20">
                <h1 class="templatemo-site-title">
                    <img src="/Digipao/media/images/digipao100714-2115100714-2117.png" alt=""/>
                    <h2>Resultado da pesquisa de Fornecedores</h2>    
                </h1>
            </div>

            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 margin-top-20">
                <div class="container-fluid container panel panel-default">
                    <br/>
                    <table class="table table-hover table-striped">
                        <tr valign="baseline" bgcolor="#404060">
                            <th align="center" style="border: 1px solid black; width: 90px">Fornecedor:</th>
                            <th align="center" style="border: 1px solid black; width: 90px">Descrição:</th>
                            <th align="center" style="border: 1px solid black; width: 90px">Preço:</th>
                            <th align="center" style="border: 1px solid black; width: 90px">Endereço:</th>
                            <th align="center" style="border: 1px solid black; width: 90px">Cidade:</th>
                            <th align="center" style="border: 1px solid black; width: 90px">Estado:</th>
                            <th align="center" style="border: 1px solid black; width: 90px">Telefone:</th>
                            <th align="center" style="border: 1px solid black; width: 20px"></th>
                        </tr>
                        
                        <c:forEach var="fornecedor" items="${ListaFornecedor}">
                            <tr style="border: 1px solid black;">
                                <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.fornecedor}" />
                            </td>
                            <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.descricao}" />
                            </td>
                            <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.preco}" />
                            </td>
                            <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.endereco}" />
                            </td>
                            <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.cidade}" />
                            </td>
                            <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.estado}" />
                            </td>
                            <td style="border: 1px solid black;">
                            <c:out value="${fornecedor.telefone}" />
                            </td>
                            <td style="border: 1px solid black;">
                                <input type="radio" name="select" value="${fornecedor.idFornecedor}"/>
                            </td>
                            </tr>
                        </c:forEach>
                    </table>
                    <br/>
                    <div style="text-align: center">
                        <button class="btn btn-default" type="submit" name="operacao" value="Alterar">Alterar</button>
                        <button class="btn btn-default" type="submit" name="operacao" value="Deletar">Deletar</button>
                        <button class="btn btn-default" type="submit" name="operacao" value="Pesquisar">Pesquisar</button>
                        <button class="btn btn-default" type="submit" name="operacao" value="Cancelar">Cancelar</button>
                    </div>
                    <br/>
                </div>
            </div>
        </form>
    </body>
</html>
